Add a missing accessor for GdkDragContext->source_window.
authorCosimo Cecchi <cosimoc@gnome.org>
Thu, 10 Jun 2010 13:52:45 +0000 (15:52 +0200)
committerCosimo Cecchi <cosimoc@gnome.org>
Thu, 10 Jun 2010 14:04:28 +0000 (16:04 +0200)
docs/reference/gdk/gdk3-sections.txt
gdk/gdk.symbols
gdk/gdkdnd.c
gdk/gdkdnd.h

index da9208c9e9c2570d9cb565f497e1ad4033c85cf6..1d4baf204bd5ae830845bcfc7ce13f03f2fa9509 100644 (file)
@@ -1273,6 +1273,7 @@ gdk_drag_context_new
 gdk_drag_drop
 gdk_drag_find_window
 gdk_drag_find_window_for_screen
+gdk_drag_context_get_source_window
 gdk_drag_begin
 gdk_drag_motion
 gdk_drop_finish
index 35676067cf004fa2eaaaaba0884f4a924cca002d..7b25c6e6a8cf6521f5d52a2b93189449629ed59e 100644 (file)
@@ -590,6 +590,7 @@ gdk_drag_context_get_actions
 gdk_drag_context_get_selected_action
 gdk_drag_context_get_suggested_action
 gdk_drag_context_list_targets
+gdk_drag_context_get_source_window
 gdk_drag_find_window
 gdk_drag_get_protocol
 #endif
index fb43b1f19fd2b23c5cecf89190f071d7f40b8419..31aa250a55a7c2a1f548e68d769b285a1e55be23 100644 (file)
@@ -166,5 +166,23 @@ gdk_drag_context_get_selected_action (GdkDragContext *context)
   return context->action;
 }
 
+/**
+ * gdk_drag_context_get_source_window:
+ * @context: a #GdkDragContext
+ *
+ * Returns the #GdkWindow where the DND operation started.
+ *
+ * Return value: (transfer none): a #GdkWindow
+ *
+ * Since: 2.22
+ **/
+GdkWindow *
+gdk_drag_context_get_source_window (GdkDragContext *context)
+{
+  g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL);
+
+  return context->source_window;
+}
+
 #define __GDK_DND_C__
 #include "gdkaliasdef.c"
index 2bdf5897cda1e0e7afff57b2d44078b7ef69ebb6..b257d1e8f0c87e9d12d3da122d79752c8fdd5352 100644 (file)
@@ -145,6 +145,8 @@ GdkDragAction    gdk_drag_context_get_actions          (GdkDragContext *context)
 GdkDragAction    gdk_drag_context_get_suggested_action (GdkDragContext *context);
 GdkDragAction    gdk_drag_context_get_selected_action  (GdkDragContext *context);
 
+GdkWindow       *gdk_drag_context_get_source_window    (GdkDragContext *context);
+
 /* Destination side */
 
 void             gdk_drag_status        (GdkDragContext   *context,